var mongoose = require('mongoose');

const get = async function () {
    return await mongoose.model("service").find()
}
const add = async function (parameter) {
    return await mongoose.model("service").create(parameter)
}
const remove = async function (_id) {
    return await mongoose.model("service").deleteOne({ _id })
}
const update = async function (_id, parameter) {
    return await mongoose.model("service").update({ _id }, parameter)
}

module.exports = { get, add, remove, update }